package com.zhiling.www.entity;

import java.util.List;

/**
 * 分页类
 */
public class PageBean<T> {

    private int pageIndex;//当前页
    private long total;//总记录数
    private int pageSize;//一页记录数
    private int pageTotal;//总页数
    private List<T> list;//一页的数据

    public PageBean() {
    }

    public PageBean(int pageIndex, long total, int pageSize, int pageTotal, List <T> list) {
        this.pageIndex = pageIndex;
        this.total = total;
        this.pageSize = pageSize;
        this.pageTotal = pageTotal;
        this.list = list;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public List <T> getList() {
        return list;
    }

    public void setList(List <T> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "pageIndex=" + pageIndex +
                ", total=" + total +
                ", pageSize=" + pageSize +
                ", pageTotal=" + pageTotal +
                ", list=" + list +
                '}';
    }
}
